load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])

package(
    default_testonly = 1,
    default_visibility = ["//:__subpackages__"],
)

android_library(
    name = "ecies_aead_hkdf_test_util-android",
    srcs = ["EciesAeadHkdfTestUtil.java"],
    deps = [
        ":hybrid_test_vector-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters-android",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters-android",
        "//src/main/java/com/google/crypto/tink/daead:aes_siv_parameters-android",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_parameters-android",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_private_key-android",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_public_key-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/subtle:hex-android",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer-android",
    ],
)

java_library(
    name = "ecies_aead_hkdf_test_util",
    srcs = ["EciesAeadHkdfTestUtil.java"],
    deps = [
        ":hybrid_test_vector",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/daead:aes_siv_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_public_key",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer",
    ],
)

android_library(
    name = "hybrid_test_vector-android",
    srcs = ["HybridTestVector.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid:hybrid_private_key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "hybrid_test_vector",
    srcs = ["HybridTestVector.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid:hybrid_private_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "hpke_test_util-android",
    srcs = ["HpkeTestUtil.java"],
    deps = [
        ":hybrid_test_vector-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters-android",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key-android",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves-android",
        "//src/main/java/com/google/crypto/tink/subtle:hex-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
    ],
)

java_library(
    name = "hpke_test_util",
    srcs = ["HpkeTestUtil.java"],
    deps = [
        ":hybrid_test_vector",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
    ],
)

android_library(
    name = "legacy_hybrid_decrypt_key_manager-android",
    srcs = ["LegacyHybridDecryptKeyManager.java"],
    deps = [
        ":legacy_hybrid_encrypt_key_manager-android",
        "//proto:hpke_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink:private_key_manager-android",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key-android",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key-android",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_decrypt-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "legacy_hybrid_encrypt_key_manager-android",
    srcs = ["LegacyHybridEncryptKeyManager.java"],
    deps = [
        "//proto:hpke_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:hybrid_encrypt-android",
        "//src/main/java/com/google/crypto/tink:key_manager-android",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters-android",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key-android",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_encrypt-android",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "legacy_hybrid_decrypt_key_manager",
    srcs = ["LegacyHybridDecryptKeyManager.java"],
    deps = [
        ":legacy_hybrid_encrypt_key_manager",
        "//proto:hpke_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:private_key_manager",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_decrypt",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "legacy_hybrid_encrypt_key_manager",
    srcs = ["LegacyHybridEncryptKeyManager.java"],
    deps = [
        "//proto:hpke_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:hybrid_encrypt",
        "//src/main/java/com/google/crypto/tink:key_manager",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_encrypt",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)
